package animation.wlh.com.animation_demo.basic

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.view.View
import android.view.animation.AlphaAnimation
import animation.wlh.com.animation_demo.R
import kotlinx.android.synthetic.main.activity_alpha_anim.*

/**
 * Created by weilh on 2016/1/22.
 */
class AlphaAnimationAct : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_alpha_anim)
        title = "透明动画"
        view.setOnClickListener(View.OnClickListener {
            var anim = AlphaAnimation(0f,1f)
            anim.duration = 2000
            view.startAnimation(anim)
        })
    }
}
